package com.huowenjie.entity;

import lombok.Data;

import javax.persistence.*;
import java.util.List;

@Table(name = "jpa_brand")
@Entity
@Data
public class Brand {
    @Column(name = "id")
    @Id
    private Long id;

    @Column(name = "bname")
    private String bname;

    @OneToMany(cascade = CascadeType.ALL,fetch = FetchType.EAGER,mappedBy = "brand")
    private List<Goods> goodsList;

}
